<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>检查变量是否在会话中已经注册</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.session-is-registered" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">session_is_registered</h1>
  <p class="verinfo">(PHP 4, PHP 5 &lt; 5.4.0)</p><p class="refpurpose"><span class="refname">session_is_registered</span> &mdash; <span class="dc-title">检查变量是否在会话中已经注册</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.session-is-registered-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>session_is_registered</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   ) : <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   检查变量是否已经在会话中注册。
  </p>
  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">本函数已自 PHP 5.3.0 起<em class="emphasis">废弃</em>并将自
PHP 5.4.0 起<em class="emphasis">移除</em>。</p></div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.session-is-registered-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">name</code></dt>

     <dd>

      <p class="para">
       变量名称。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.session-is-registered-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <span class="function"><strong>session_is_registered()</strong></span> 返回 <strong><code>TRUE</code></strong> 则表示 <code class="parameter">name</code> 变量已经在当前会话中注册使用，否则返回 <strong><code>FALSE</code></strong> 。
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.session-is-registered-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    如果使用 <var class="varname"><var class="varname"><a href="reserved.variables.session.html" class="classname">$_SESSION</a></var></var> (或 <var class="varname"><var class="varname">$HTTP_SESSION_VARS</var></var> for PHP 4.0.6 or less),可以使用 <span class="function"><a href="isset.html" class="function">isset()</a></span> 检查变量是否在 <var class="varname"><var class="varname"><a href="reserved.variables.session.html" class="classname">$_SESSION</a></var></var> 中注册使用。
   </p>
  </p></blockquote>
  <div class="caution"><strong class="caution">Caution</strong>
   <p class="para">
    如果使用 <var class="varname"><var class="varname"><a href="reserved.variables.session.html" class="classname">$_SESSION</a></var></var>
    (或 <var class="varname"><var class="varname">$HTTP_SESSION_VARS</var></var>), 则不要使用
    <span class="function"><a href="session_register.html" class="function">session_register()</a></span>,
    <span class="function"><strong>session_is_registered()</strong></span> 和
    <span class="function"><a href="session_unregister.html" class="function">session_unregister()</a></span>.
   </p>
  </div>
 </div>


</div></div></div></body></html>